home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / text / edit / envwww21.lha / envWWW21 / support / preview_ibrowse.ged < prev    next >
Text File  |  1996-11-13  |  1KB  |  60 lines

  1. /* $VER: 1.0, ©1996 Dietmar Eilert. HTML preview for IBrowse 1.02 */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  9.  
  10. if (RC ~= 0) then
  11.     exit
  12.  
  13. OPTIONS FAILAT 6                            /* ignore warnings         */
  14.  
  15. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  16.  
  17. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  18.  
  19. if (show('P', "IBROWSE") = 0) then
  20.  
  21.     'REQUEST PROBLEM="IBrowse ARexx port not found"'
  22.  
  23. else do
  24.  
  25.     'QUERY DOC VAR=DOC'
  26.  
  27.     if (exists(DOC)) then
  28.  
  29.         'SAVE ALL'
  30.  
  31.     else do
  32.  
  33.         DOC = "t:preview.html"
  34.  
  35.         'SAVE ALL EXPORT NAME="' || DOC || '"'
  36.     end
  37.  
  38.     'UNLOCK'
  39.  
  40.     ADDRESS 'IBROWSE'
  41.  
  42.     'GOTOURL "file://localhost/' || DOC || '"'
  43.  
  44.     exit
  45. end
  46.  
  47. /* ---------------------------- END OF YOUR CODE --------------------- */
  48.  
  49. 'UNLOCK' /* VERY important: unlock GUI */
  50.  
  51. exit
  52.  
  53. SYNTAX:
  54.  
  55. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  56.  
  57. 'UNLOCK'
  58.  
  59. exit
  60.